package com.whc.gulimall.ware.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.whc.common.utils.PageUtils;
import com.whc.gulimall.ware.entity.PurchaseEntity;
import com.whc.gulimall.ware.vo.MergeVo;
import com.whc.gulimall.ware.vo.PurchaseDoneVo;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;
import java.util.Map;

/**
 * 采购信息
 *
 * @author wanghaochen
 * @email angaoen@outlook.com
 * @date 2022-03-05 00:09:03
 */
public interface PurchaseService extends IService<PurchaseEntity> {

    PageUtils queryPage(Map<String, Object> params);

    /**
     * 查询未领取的采购单
     *
     * @param params 分页条件
     * @return 分页数据
     */
    PageUtils listUnReceivePurchase(@RequestParam Map<String, Object> params);

    /**
     * 合并采购项
     *
     * @param merge 数据
     */
    void mergePurchase(MergeVo merge);

    /**
     * 领取采购项
     *
     * @param purchaseIds 采购单id列表
     */
    void receivePurchase(List<Long> purchaseIds);

    /**
     * 完成采购需求
     *
     * @param vo 数据
     */
    void done(PurchaseDoneVo vo);
}

